import {
  defineConfig,
  presetAttributify,
  presetIcons,
  presetUno,
  transformerDirectives,
  transformerVariantGroup,
} from "unocss";

export default defineConfig({
  presets: [presetUno(), presetAttributify(), presetIcons()],
  // 自定义规则
  rules: [["custom-rule", { color: "red" }]],
  // 自定义快捷方式
  shortcuts: {
    btn: "py-2 px-4 font-semibold rounded-lg shadow-md",
    "btn-primary": "text-white bg-blue-500 hover:bg-blue-700",
    "flex-center": "flex justify-center items-center",
  },
  // 主题配置
  theme: {
    colors: {
      primary: "#3498db",
      secondary: "#2ecc71",
    },
  },
  transformers: [transformerDirectives(), transformerVariantGroup()],
});
